import request from '@/utils/request'

// 查询还款方式列表
export function listRefund(query) {
  return request({
    url: '/loan/refund/list',
    method: 'get',
    params: query
  })
}

// 查询还款方式详细
export function getRefund(refundId) {
  return request({
    url: '/loan/refund/getRefund/' + refundId,
    method: 'get'
  })
}

// 新增还款方式
export function addRefund(data) {
  return request({
    url: '/loan/refund/addRefund',
    method: 'post',
    data: data
  })
}

// 修改还款方式
export function updateRefund(data) {
  return request({
    url: '/loan/refund/updateRefund',
    method: 'put',
    data: data
  })
}

// 删除还款方式
export function delRefund(refundId) {
  return request({
    url: '/loan/refund/delRefund/' + refundId,
    method: 'delete'
  })
}
